fix: 8.1.16 bug-fix batch (BUG-1 to BUG-8)#17
Merged
cct08311github merged 8 commits intodotnet8from Mar 4, 2026
Merged
Conversation
…elds in test gen [BUG-1] - Add null guard at entry of GenerateAddFKModel (t == null → return "") - Add null check before dereferencing fktype.Name in GenerateTest and GenerateAddFKModel - Add fktype != null guards in recursive FK resolution to avoid null propagation - Add pro.SetMethod != null check in GetRandomValues to skip get-only properties, preventing generated test code from assigning values to readonly fields Upstream: dotnetcore/WTM#490, dotnetcore/WTM#654 Part of #14 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Wrap Image.Load() in try-catch: ImageSharp throws UnknownImageFormatException when a non-image file is uploaded (never returns null as the old null check assumed) - Return 400 Bad Request instead of propagating unhandled exception (500) Upstream: dotnetcore/WTM#652 Part of #14 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Filters [BUG-3] - FileAttachment implements ITenant, so EF applies TenantCode query filter to all lookups - Files uploaded by system admin (TenantCode=null) were invisible to tenant users because the filter WHERE TenantCode = 'tenant_a' excluded NULL-tenant files - Fix: use IgnoreQueryFilters() in GetFile, DeleteFile, GetFileName so files are retrieved by ID regardless of tenant — file IDs (UUIDs) already serve as capability tokens Upstream: dotnetcore/WTM#650 Part of #14 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Enabled property to CS config model (default: true for backward compatibility) - Filter disabled connections in AddWtm startup loop (skip EnsureCreate) - Wrap EnsureCreate() in try-catch so one bad connection doesn't block others - Update GetCS() routing to exclude disabled connections and their read replicas - Guard CreateDC() in WTMContext: throws clear InvalidOperationException when code attempts to use a disabled connection at runtime Allows graceful degradation when Oracle or other secondary DB is unreachable. Set Enabled: false in appsettings.json Connections array to disable a connection. Part of #16 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ols [BUG-8] - BackgroundService runs 2s after startup, calls CanConnectAsync() on each enabled connection to pre-warm the connection pool - Moves Oracle's ~60s cold start (TNS resolution, pool creation, ODP.NET metadata loading) from first user request to app boot (background) - Fault-tolerant: logs warning on failure, never crashes app or blocks startup - Respects BUG-7 Enabled toggle: skips disabled connections Root cause: ODP.NET cold start includes TNS resolution, connection pool creation, internal metadata loading, and self-tuning calibration — all on first Open(). Pre-warming with CanConnectAsync() during boot triggers all of this up front. Part of #16 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- MySQL treats schema = database; applying the default Elsa schema name "Elsa" causes EF Core to look for a separate MySQL database that may not exist - Fix: return null schema for MySQL (via ProviderName check), same as Oracle - This allows Elsa to create its tables in the current MySQL database without a schema prefix Upstream: dotnetcore/WTM#659 Part of #15 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ironments [BUG-5] - MainDir computation: fix crash when AppDomain.BaseDirectory lacks \bin\Debug\ or \bin\Release\ (e.g. dotnet run from repo root, Docker containers, published apps). Previous code set index=-1 and called Substring(0,-1) → ArgumentOutOfRangeException. Fix: fall back to Directory.GetCurrentDirectory() when bin path not found. - GetAllModels(): guard against null DcConstructor (e.g. connections with Enabled=false from BUG-7 fix, or when no matching DataContext constructor is found via reflection). Upstream: dotnetcore/WTM#661 Part of #15 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…G-6] When the user provides a custom Items list with pre-set Selected=true flags and no field model value or DefaultValue is resolved (selectVal is empty), the previous code forced all items to Selected=false, ignoring the user's intent. Fix: only override item selection state when selectVal has entries. If selectVal is empty, the existing Selected values on items are preserved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
8-bug stabilization batch for 8.1.16, all P0/P1 issues from the spec.
fix(codegen): Prevent NullRef inGenerateAddFKModel; skip readonly fields in test genfix(upload): Handle non-image files inUploadImage— return 400 instead of 500fix(tenant): File access bypasses tenant query filter viaIgnoreQueryFilters()fix(workflow): Elsa workflow tables not auto-created in MySQL (null schema fix)fix(codegen): CodeGen path fails in non-standard environments (\bin\Debug\not found)fix(ui): ComboBox respectsitem.Selectedwhen noDefaultValueis setfeat(multidb): AddEnabledtoggle per database connection inappsettings.jsonperf(oracle): AddDbConnectionWarmupServiceto pre-warm connection pools at startupCloses #14, #15, #16
Test plan
/File/UploadImage→ 400 returnedEnabled: falseon a connection → app starts without waiting for that DB🤖 Generated with Claude Code